﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ControlButton : MonoBehaviour {

	public RandomLunchManager manager;

	public void OnClick(int type){
		switch (type)
		{	
			case 1 :
				if(!manager.stop){
					return;
				}
				manager.stop = false;
				manager.ComputeRestraunt();
				StartCoroutine(manager.ChooseRestraunt());
				break;
			case 2 :
				manager.stop = true;
				break;
			default:
				break;
		}
	}

}
